
    
    <form class="checkoutform" action="{:U('update')}" method="post" style="min-height:1000px;">
    <input type="hidden" name="id" value="{$info.id}"  />
    

          <div class="form-group">
            <label class="control-label">关键词</label>
            <div>
              <input class="form-control" datatype="*" value="{$info.keyword}" name="keyword" type="text" placeholder="关键词">
            </div>
          </div>
    
    
    
    
    <div class="form-group icheck hidden">
    
    
    <div style="display:inline-block;">
        <div class="radio square-red single-row">
          <input type="radio" value="text" <eq name="info['MsgType']" value="text">checked="checked"</eq> name="MsgType">
          <label>文本</label>
        </div>
      </div> 
      <div style="display:inline-block;">
        <div class="radio square-red single-row">
          <input type="radio" value="news" <eq name="info['MsgType']" value="news">checked="checked"</eq> name="MsgType">
          <label>图文</label>
        </div>
      </div>
    
    <div style="display:inline-block;">
        <div class="radio square-red single-row">
          <input type="radio" value="image" <eq name="info['MsgType']" value="image">checked="checked"</eq> name="MsgType">
          <label>图片</label>
        </div>
      </div>
    
    
    
    
    
          </div>
    
   <div class="clearfix"></div>
    
    
    
    
     <div class="form-group">
            <label class="control-label"></label>
            <div>
              <div <neq name="info['MsgType']" value="text">style="display:none;"</neq> class="content">
              <textarea class="form-control" name="content" cols="70" rows="5" id="content">{$info.content}</textarea>
            </div>
            
            
            
            
            
            
            
            
            <div <neq name="info['MsgType']" value="news">style="display:none;"</neq> class="content" id="replyList">
              <ul>
              <volist name="newsList" id="vo">
                <li>
                  <table class="table table-bordered" width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td>标题：
                        <input type="text" size="70" name="title[]" value="{$vo.title}" /></td>
                        <td rowspan="2"><textarea name="description[]" rows="5">{$vo.description}</textarea></td>
                      <td rowspan="2"><input type="hidden" name="img_url[]" value="{$vo.img_url}" />
                        <img src="<notempty name="vo['img_url']">{:getThumbPath($vo['img_url'])}
                        <else/>
                        __PUBLIC__/Admin/images/defaultimg.png
                        </notempty>
                        " onclick="showImgBox(this);" id="img_url" height="40" width="40" /></td>
                      <td rowspan="2"><a href="javascript:void(0);" onclick="after(this);">上</a><a href="javascript:void(0);" onclick="append(this);">下</a></td>
                      <td rowspan="2"><a class="delnews" href="javascript:void(0);" onclick="delnews(this);">×</a></td>
                    </tr>
                    <tr>
                      <td>链接：
                        <input type="text" name="link[]" value="{$vo.link}" size="70" /></td>
                    </tr>
                  </table>
                </li>
                </volist>
              </ul>
              <a href="javascript:;" onclick="addnews();" style="display:inline-block;" class="btn btn-success">添加</a></div>
                
            </div>
          </div>
    
    
    
    
    
    <div <neq name="info['MsgType']" value="image">style="display:none;"</neq> class="content">
              
              
              
              
              
              <div class="form-group">
      <label class="control-label"></label>
      <div>
         <input name="img_url1" type="hidden" value="{$info.img_url}" /><img onclick="showImgBox(this);" src="<notempty name="info['img_url']">{:getThumbPath($info['img_url'])}<else/>__PUBLIC__/Admin/images/defaultimg.png</notempty>" id="img_url1" height="40" />
      </div>
   </div>
              
              
              
              
              
              
              

    
      </div>
    

    
    
    
   
      

    </form>










<ul id="copyHTML" style="display:none;">
              <li>
                  <table class="table table-bordered" width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td>标题：
                        <input type="text" size="70" name="title[]" /></td>
                        
                        <td rowspan="2"><textarea name="description[]" rows="5"></textarea></td>
                      <td rowspan="2"><input type="hidden" name="img_url[]" />
                        <img src="<notempty name="info['img_url']">{:getThumbPath($info['img_url'])}
                        <else/>
                        __PUBLIC__/Admin/images/defaultimg.png
                        </notempty>
                        " onclick="showImgBox(this);" id="img_url" height="40" width="40" /></td>
                      <td rowspan="2"><a href="javascript:void(0);" onclick="after(this);">上</a><a href="javascript:void(0);" onclick="append(this);">下</a></td>
                      <td rowspan="2"><a class="delnews" href="javascript:void(0);" onclick="delnews(this);">×</a></td>
                    </tr>
                    <tr>
                      <td>链接：
                        <input type="text" name="link[]" size="70" /></td>
                    </tr>
                  </table>
                </li>
              </ul>
<script>
        $("input[name='MsgType']").each(function(index, element) {
            $(this).change(function(e) {
                $('div.content').hide();
				$('div.content').eq(index).show();
            });
        });
		
		function append(e){
	    $(e).parent().parent().parent().parent().parent('li').next().after($(e).parent().parent().parent().parent().parent('li'));
    }
	function delnews(e){
		$(e).parent().parent().parent().parent().parent().remove();
	}
	function addnews(){
		var html = $('#copyHTML').html();
		$(html).appendTo('#replyList ul');
	}
</script>
<style>#replyList ul{margin:0; padding:0;}
#replyList ul li{list-style-type:none;}
</style>
